﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WLMes.Models
{
    /// <summary>
    /// 需求单
    /// 输入参数
    /// </summary>
    public class END_TASK_request
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string RequestCode { get; set; }
        /// <summary>
        /// 产线编号
        /// </summary>
        public string LineCode { get; set; }
        /// <summary>
        /// 工序编号
        /// </summary>
        public string OperationCode { get; set; }
        /// <summary>
        /// 工序短名称
        /// </summary>
        public string OperationShortName { get; set; }
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 生产批次号
        /// </summary>
        public string ProductionBatchCode { get; set; }
        /// <summary>
        /// 批次完工时间
        /// </summary>
        public string CompleteTime { get; set; }
        /// <summary>
        /// 品类类型编码
        /// </summary>
        public string CategoryCode { get; set; }

        /// <summary>
        /// 产出数量
        /// </summary>

        public int PartsQuantity { get; set; }
        /// <summary>
        /// 请求（操作）时间
        /// </summary>
        public string RequestTime { get; set; }
        /// <summary>
        /// 大板使用情况集合
        /// </summary>
        public List<BoardSetsList> BoardSets { get; set; } = new List<BoardSetsList>();
        /// <summary>
        /// 多出的产出数量
        /// </summary>
        public int RedundantPartsQuantity { get; set; }

    }

    public class BoardSetsList
    {
        /// <summary>
        /// 物料编号
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        /// 上线口
        /// </summary>
        public string EntranceCode { get; set; }
        /// <summary>
        /// 消耗数量
        /// </summary>
        public int UsedQuantity { get; set; }
        /// <summary>
        /// 报废数量
        /// </summary>
        public int ScrappedQuantity { get; set; }
        /// <summary>
        /// 缺陷数量
        /// </summary>
        public int DefectQuantity { get; set; }
        public List<DefectSetsList> DefectSets { get; set; }

    }
    public class DefectSetsList
    {
        public string PalletCode { get; set; }
        public int DefectQuantity { get; set; }
    }

    /// <summary>
    /// 回传数据
    /// 返回信息
    /// </summary>
    public class END_TASK_response
    {
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 描述信息
        /// </summary>
        public string EventDescription { get; set; }

    }
}
